﻿using System;
using System.Collections.Generic;

namespace Fcdbas.WinUI.Common
{
    public interface IUserSecurity
    {
        bool Authorize(string identity_, string presObject,string securityObject, string objectType);

        bool DBAuthorize(string identity_,string securityObject, string objectType);

    }
    //sub_object_type_: 针对Database类型的细化( Window: 窗口; MenuItem: 菜单; Button: 菜单, Datasource: 数据实体; Procedure: 存储过程; Function: 存储函数; View: 视图; Reference: 参考字段)
    public class SecObjectType 
    {
        public const string Window = "Window";
        public const string MenuItem = "MenuItem";
        public const string Button = "Button";
        public const string DataSource = "Datasource";
        public const string Procedure = "Procedure";
        public const string Function = "Function";
        public const string View = "View";
        public const string Reference = "Reference";
        public const string LOV = "LOV";
        public const string Zoom = "Zoom";
        public const string Client = "Client";
        public const string Database = "Database";
    }

    //public enum SecurityObjectType : int
    //{
    //    Window = 0,

    //    View = 1,

    //    Method = 2
    //}
}
